home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 18 / 018.d81 / state matters (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  10KB  |  263 lines

  1. 0 rem  *****************************           **      u.s.a. today       **
  2. 1 rem  *****************************              from    djb   shibley
  3. 2 rem
  4. 9 sp$="                    ":ms$="":gosub1100
  5. 10 gosub5000:goto100
  6. 25 u=54272:pokeu+1,20:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,17
  7. 26 forj=1to10:next:pokeu+4,16:return
  8. 30 u=54272:pokeu+1,220:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,17
  9. 31 forj=.to10:next:pokeu+4,16:return
  10. 35 u=54272:pokeu+1,5:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,7
  11. 36 forj=1to5:next:pokeu+4,16:return
  12. 40 u=54272:pokeu+1,50:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,7
  13. 41 forj=1to5:next:pokeu+4,16:return
  14. 100 poke53265,peek(53265)and139
  15. 101 poke53280,4:poke53281,10:print"[147]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145] ";
  16. 102 gosub25
  17. 105 print" [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  ";
  18. 110 forj=0to9:print"  ";
  19. 115 print"  ";:next
  20. 116 print"  ";
  21. 120 print"  [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  ";
  22. 125 print"[145]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145]  [145] ";
  23. 130 print"[191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]";
  24. 135 forj=1to19:print"[191]                                  [191]";:next
  25. 140 print"[191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]"
  26. 145 print"[185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]"
  27. 150 print"[145]  matters of state  "
  28. 155 print"[162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]"
  29. 160 print"[144]                       "
  30. 165 print"[145]                       "
  31. 175 print"                       "
  32. 180 print"1 - what state am i ?"
  33. 185 print"2 - capitols"
  34. 190 print"3 - my neighbors are..."
  35. 195 print"4 - stop (and get scores)"
  36. 196 print"[166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":poke53265,peek(53265)or16
  37. 197 gosub25
  38. 200 printms$"[144]  press option  (1-4)"
  39. 205 forj=1to25:getx$:ifx$=""thennext:goto212
  40. 210 j=25:next:goto220
  41. 212 printms$sp$" "
  42. 215 forj=1to20:getx$:ifx$=""thennext:goto200
  43. 220 q=val(x$):if(q<1orq>4)andx$<>""then200
  44. 222 gosub25:ifx$=""then2000
  45. 230 onqgoto500,240,350,2000
  46. 240 print"[158]                       "
  47. 245 print"[145]                       "
  48. 250 print"                       "
  49. 255 s=int(rnd(.)*50+1):print"[145][145][145]"spc(20-(len(s$(s,1)))/2)s$(s,1)""
  50. 256 x1=int(rnd(.)*50+1):ifx1=sthen256
  51. 257 x2=int(rnd(.)*50+1):ifx2=sorx2=x1then257
  52. 258 x3=int(rnd(.)*50+1):ifx3=sorx3=x2orx3=x1then258
  53. 259 x4=int(rnd(.)*50+1):ifx4=sorx4=x3orx4=x2orx4=x1then259
  54. 260 x$(1)=s$(x1,3):x$(2)=s$(x2,3):x$(3)=s$(x3,3)
  55. 262 x$(4)=s$(x4,3):a=int(rnd(.)*4+1):x$(a)=s$(s,3)
  56. 270 printspc(14)""x$(1)right$(sp$,21-len(x$(1)))
  57. 275 printspc(14)""x$(2)right$(sp$,21-len(x$(2)))
  58. 280 printspc(14)""x$(3)right$(sp$,21-len(x$(3)))
  59. 285 printspc(14)""x$(4)right$(sp$,21-len(x$(4)))
  60. 290 printms$"[158]";
  61. 292 poke198,.:wait198,1:getx$:x=val(x$):ifx$<>""andx<1orx>4then292
  62. 295 ifx$=""then100
  63. 300 print"         ";:ifx=athen320
  64. 305 print"wrong        ":gosub35:gosub35:forj=1to1500:next:gosub35
  65. 310 w(q)=w(q)+1:goto325
  66. 320 gosub30:print"right       ":r(q)=r(q)+1
  67. 325 forj=1to4:print""spc(14);:ifj=athenprint:goto330
  68. 327 printsp$
  69. 330 next:forj=1to2500:next:goto240
  70. 350 print"[156]   "sp$
  71. 351 print"[145]   "sp$
  72. 352 print"   "sp$""
  73. 354 print"            "sp$
  74. 355 print"[145]            "sp$
  75. 356 print"            "sp$
  76. 357 print"[145]            "sp$
  77. 358 print"            "sp$
  78. 359 print"[145]            "sp$
  79. 360 print"return the state bordered by"
  80. 362 print"[145][159]                             "
  81. 370 s=int(rnd(.)*50+1):print"";
  82. 375 prints$(t(s,1),1)spc(16-len(s$(t(s,1),1)))s$(t(s,2),1)"[156]":im=35:z$=""
  83. 380 gosub800:ifx$=""then100
  84. 384 ifx$=chr$(13)thengosub850:ifck=.then380
  85. 390 ifck=1thenr(q)=r(q)+10:goto460
  86. 395 print"";:w(q)=w(q)+1
  87. 398 prints$(t(s,3),1)spc(16-len(s$(t(s,3),1)))s$(t(s,4),1):im=30
  88. 400 print"[156]":gosub800:ifx$=""thenw(q)=w(q)-1:goto100
  89. 405 ifx$=chr$(13)thengosub850:ifck=.then400
  90. 410 ifck=1thenr(q)=r(q)+9:goto460
  91. 412 print"";:w(q)=w(q)+1
  92. 415 prints$(t(s,5),1)spc(16-len(s$(t(s,5),1)))s$(t(s,6),1):im=30
  93. 417 print"[156]":gosub800:ifx$=""thenw(q)=w(q)-2:goto100
  94. 420 ifx$=chr$(13)thengosub850:ifck=.then417
  95. 424 ifck=1thenr(q)=r(q)+8:goto460
  96. 426 print"";:w(q)=w(q)+1
  97. 429 prints$(t(s,7),1)spc(16-len(s$(t(s,7),1)))s$(t(s,8),1):im=44
  98. 432 print"[156]":gosub800:ifx$=""thenw(q)=w(q)-3:goto100
  99. 435 ifx$=chr$(13)thengosub850:ifck=.then432
  100. 438 ifck=1thenr(q)=r(q)+7:goto460
  101. 440 poke53280,5:forj=1to200:next:printms$"[156] you have only seconds"
  102. 441 fork=.to9:gosub40:forj=1to30:next:next
  103. 443 poke53280,4:forj=1to200:next:printms$"   "sp$ms$"  "z$;
  104. 444 w(q)=w(q)+1:im=25
  105. 445 print"[156]":gosub800:
  106. 447 ifx$=chr$(13)thengosub850:ifck=.then445
  107. 448 ifck=1thenr(q)=r(q)+6:goto460
  108. 449 r(q)=r(q)+5:w(q)=w(q)+2
  109. 450 gosub35:printms$"    your time is up  ":forj=1to2000:next
  110. 452 gosub35:printms$"     the state is: ":forj=1to1300:next:printms$sp$
  111. 453 printms$spc(16-len(s$(s,1)))s$(s,1):forj=1to2900:next:goto350
  112. 460 gosub30:ck=.:printms$sp$"   "ms$"       you're right":forj=1to2000:next
  113. 461 goto350
  114. 500 printms$"[145]                       "
  115. 505 print"[145]                       "
  116. 510 print"                       "
  117. 520 print"            "sp$
  118. 521 print"            "sp$
  119. 522 print"[145]            "sp$
  120. 523 print"            "sp$
  121. 524 print"[145]            "sp$
  122. 525 print"            "sp$
  123. 527 print"[145]            "sp$"[145][145][145][145][145][145][145][145][145]":s=int(rnd(.)*50+1)
  124. 530 print"i begin with- "left$(s$(s,1),1):im=35:z$=""
  125. 535 print"":gosub800:ifx$=""then100
  126. 540 ifx$=chr$(13)thengosub850:ifck=.then535
  127. 545 ifck=1thenr(q)=r(q)+10:goto666
  128. 548 x=int(rnd(.)*t(s,.)+1):y=int(rnd(.)*t(s,.)+1):ify=xthen548
  129. 550 print"i border- "s$(t(s,x),1)
  130. 555 print"[145]and- "s$(t(s,y),1):im=35:w(q)=w(q)+1
  131. 560 print"":gosub800:ifx$=""thenw(q)=w(q)-1:goto100
  132. 565 ifx$=chr$(13)thengosub850:ifck=.then560
  133. 566 ifck=1thenr(q)=r(q)+9:goto666
  134. 570 print"i'm abbreviated- "s$(s,2):im=35:w(q)=w(q)+1
  135. 575 print"":gosub800:ifx$=""thenw(q)=w(q)-2:goto100
  136. 580 ifx$=chr$(13)thengosub850::ifck=.then575
  137. 584 ifck=1thenr(q)=r(q)+8:goto666
  138. 585 print"my capitol is- "s$(s,3):im=30:w(q)=w(q)+1
  139. 590 print"":gosub800:ifx$=""thenw(q)=w(q)-3:goto100
  140. 595 ifx$=chr$(13)thengosub850:ifck=.then590
  141. 599 ifck=1thenr(q)=r(q)+7:goto666
  142. 600 poke53280,5:forj=1to200:next:printms$" you have only seconds"
  143. 601 fork=.to9:gosub40:forj=1to30:next:next
  144. 602 poke53280,4:forj=1to200:next:printms$"   "sp$ms$"  "z$;
  145. 604 w(q)=w(q)+1:im=25
  146. 608 print"":gosub800:
  147. 610 ifx$=chr$(13)thengosub850:ifck=.then608
  148. 615 ifck=1thenr(q)=r(q)+6:goto666
  149. 620 r(q)=r(q)+5:w(q)=w(q)+2
  150. 622 gosub35:printms$"    your time is up  ":forj=1to2000:next:gosub35
  151. 630 printms$"     the state is: ":forj=1to1300:next:printms$sp$
  152. 633 printms$spc(16-len(s$(s,1)))s$(s,1):forj=1to2900:next:goto500
  153. 666 ck=.:printms$sp$"   "ms$"       you're right":gosub30:forj=1to2000:next
  154. 667 goto500
  155. 799 poke788,49:stop
  156. 800 print""spc(10+len(z$));
  157. 805 print" [157]";:forj=1to30:getx$:ifx$=""thennext:im=im-1:ifim=.thenreturn
  158. 808 ifx$=""then812
  159. 810 j=30:next:goto820
  160. 812 print"[146] [157]";:forj=1to30:getx$:ifx$=""thennext:go